package jeecg.business.service.impl.message;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import jeecg.business.service.message.MessageServiceI;
import org.jeecgframework.core.common.service.impl.CommonServiceImpl;

@Service("messageService")
@Transactional
public class MessageServiceImpl extends CommonServiceImpl implements MessageServiceI {
	public int hasnoreadnew(String jsr){
		String sql = " select count(1) from nms_message where jsrid = '"+jsr+"' and sfck is null ";
		return getJdbcTemplate().queryForInt(sql);
	}
	
	
	public void updateHasRead(String jsrid){
		String sql = " update nms_message set sfck = '1' where jsrid = '"+jsrid+"' ";
		getJdbcTemplate().update(sql);
	}
}